export function throttle (fn, delay) {
  let last = 0
  return function () {
    let _this = this
    let args = arguments
    let now = +new Date()
    // 这种方法保证第一次直接执行，后续连续点击可以节流
    if (now - last >= delay) {
      fn.apply(_this, args)
      last = now
    }
  }
}